const express = require('express')
const router = express.Router()
const expressJoi = require('@escook/express-joi')
const {del_entrust_info_schema} = require('../schema/entrust')

const entrustInfoHandler = require('../router_handler/entrust')

// 增
router.post('/addEntrust', entrustInfoHandler.addEntrust)

// 查
router.get('/getEntrustInfoAll', entrustInfoHandler.getEntrustInfoAll)
// 根据委托id查询委托信息
router.post('/getEntrustinfoById', entrustInfoHandler.getEntrustinfoByEntId)
// 根据id改状态
router.post('/updateStatusByEntrustId', entrustInfoHandler.updateStatusByEntrustId)
// 删
router.post('/delEntrust', expressJoi(del_entrust_info_schema), entrustInfoHandler.delEntrust)

module.exports = router
